﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotHandler;
using System.Text.RegularExpressions;
using System.Globalization;

namespace DotBusiness.Models
{
    public class MTipo : Mapping
    {
        #region Métodos
        public int Cod
        {
            get
            {
                return o.Id;
            }
            set{}
        }
        public string Tipo
        {
            get
            {
                return o.Titulo;
            }
            set
            {
            }
        }

        public string Valor
        {
            get
            {
                return String.Format("{0:C}", o.Preco);
            }
            set
            {
                try
                {
                    o.Preco = Double.Parse(value, NumberStyles.Currency);
                }
                catch
                {
                    
                }
            }
        }
        #endregion

    }
}
